<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <%@ include file="/common/header.jsp" %>
        <%--<link href="<%=basePath %>/plug/dhtmlxTree/codebase/dhtmlxtree.css" rel="stylesheet" type="text/css"/>--%>
        <title>CA认证信息</title>
    </head>
    <body>
      <div id="dialog"></div>
        <table style="width:50%;height:100px;">
            <tr>
                <td align="left">
                    用户ID：
                    <input type="text" id="userId"/>
                    <button id="search" onclick="search()">查询</button>
                </td>
            </tr>
        </table>

        <div id="dataGrid" style="width:100%;"/>

    <script>
        $("#dataGrid").datagrid({
            url: "<%=basePath%>/ca/queryList",
            loadMsg: "正在查询数据...",
            width: $(window).width()*0.99,
            height: $(window).height()*0.85,
            pagination: true,
            singleSelect:true,
            pageSize:15,
            pageList :[15,20,25],
            columns: [
                [
                    {field: 'id', title: '序号',fit:true, align: 'center'},
                    {field: 'userId', title: '用户ID',width:70, fit:true,fit:true, align: 'center'},
                    {field: 'userName', title: '用户姓名', fit:true,fit:true, align: 'center'},
                    {field: 'signatureCustomerId', title: '客户编号',  fitColumns:true,fit:true,  align: 'center'},
                    {field: 'passCode', title: '通道号',  fitColumns:true,fit:true,  align: 'center'},
                    {field: 'phone', title: '手机号', fit:true,fit:true, align: 'center'},
                    {field: 'email', title: '邮箱', fit:true, align: 'center'},
                    {field: 'status', title: '状态', fit:true, align: 'center'}
                ]
            ],
            onLoadSuccess:function(data){
                if (data.errorMsg){
                    $.messager.alert('错误',data.errorMsg);
                }
            },
            onLoadError:function(){
                $.messager.alert('错误',"错误");
            }
        });
        
        function search() {
            var userId = $("#userId").val();

            $('#dataGrid').datagrid('reload', {
                step : "step",
                userId : userId
            });
        }
</script>
</body>
</html>